//
//  HelperUtil.h
//  SQLite（购物）
//
//  Created by Yock Deng on 15/8/22.
//  Copyright (c) 2015年 蓝桥. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#include <sys/param.h>
#include <sys/mount.h>



@interface HelperUtil : NSObject

/**
 图片裁剪，适用于圆形头像之类
 
 @param image 要切圆的图片
 @param borderWidth 边框的宽度
 @param color 边框的颜色
 @return 切圆的图片
 */
+ (UIImage *)imageWithClipImage:(UIImage *)image borderWidth:(CGFloat)borderWidth borderColor:(UIColor *)color;

+ (UIColor *) colorWithHexString: (NSString *) stringToConvert;

+ (UIViewController *)jsd_getCurrentViewController;

+ (UIViewController *)jsd_getRootViewController;

//空闲磁盘空间
+ (NSString *)freeDiskSpaceInBytes;
//磁盘总空间
+ (NSString *)getTotalDiskSpace;
//空闲内存
+(NSString *)getFreeMemoryInfo;
//内存总空间
+(NSString *)getTotalMemoryInfo;

#pragma mark - 是否被破解
+ (BOOL)isJailbreak;
//获取CPU类型
+(NSString *)getCPUType;

//字符串转字典
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;

//个人觉得 sdk开发时候 最好不要用第三方 最好可以用最原始的方法 替换 此处仅做sdk封装使用  留存
+(void)POST:(NSString *)urlStr params:(NSDictionary *)params  sucess:(void (^)(NSURLSessionDataTask *task, id responseObject))sucess failure:(void (^)(NSURLSessionDataTask *task, NSError * error))failure;
+ (NSString *)URLEncodedStringValue:(NSDictionary *)Parameter url:(NSString *)urlStr;
+(void) logMemoryInfo;

+ (NSString *)getTotalMemorySize;
+(void) print_free_memory;
+(NSString *) executableUUID;

+ (NSDictionary *)getUUIDDictionary;
  NSUUID *ExecutableUUID(void);
+ (NSUUID *)ExecutableUUID;

#pragma mark 字典转化字符串
+(NSString*)dictionaryToJson:(NSDictionary *)dic;

+ (NSString *)dataTOjsonString:(id)object;

@end
